﻿using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using wUniApp.MVC.App_GlobalResources;

namespace wUniApp.MVC.App_Data
{
  [MetadataType(typeof(ProductsMetadata))]
  public partial class Product
  {
  }
  public class ProductsMetadata
  {
    [wLocRequiredAttribute]
    [Display(Name = "ProductName", ResourceType = typeof(Resources))]
    public object Name;
  }

  [MetadataType(typeof(CustomerMetadata))]
  public partial class Customer
  {

  }
  public class CustomerMetadata
  {
    [Display(Name = "FirstName", ResourceType = typeof(Resources))]
    [wLocRequiredAttribute]
    public object FirstName;

    [Display(Name = "LastName", ResourceType = typeof(Resources))]
    [wLocRequiredAttribute]
    public object LastName;

    [Display(Name = "Email", ResourceType = typeof(Resources))]
    [EmailAddress]
    public object Email;

    [Display(Name = "MonthlyIncome", ResourceType = typeof(Resources))]
    public object MonthlyIncome;
  }

  [MetadataType(typeof(ExecutionMetadata))]
  public partial class Execution
  {
  }
  public class ExecutionMetadata
  {
    [ScaffoldColumn(false)]
    public object Id;
    [ScaffoldColumn(true)]
    public object Description;
    [ScaffoldColumn(false)]
    public object CustomerId;
    [ScaffoldColumn(true)]
    public object AmountDue;

    // Foreign keys
    public virtual Customer Customer { get; set; } // FK_Executions_Customers
  }

  [MetadataType(typeof(InheritanceProcedureMetadata))]
  public partial class InheritanceProcedure
  {

  }
  public class InheritanceProcedureMetadata
  {
    [Display(Name = "Description", ResourceType = typeof(Resources))]
    public object Description;
    [Display(Name = "Amount", ResourceType = typeof(Resources))]
    public object AmountDue;
  }
}